package com.YHVision.qiuzhike.service;

import com.YHVision.qiuzhike.model.entity.Company;
import com.YHVision.qiuzhike.model.entity.User;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.YHVision.qiuzhike.model.dto.companyFavour.CompanyFavourQueryRequest;
import com.YHVision.qiuzhike.model.entity.CompanyFavour;

import javax.servlet.http.HttpServletRequest;

/**
 * 企业收藏服务
 *
 * @author <a href="">YHVision-小y</a>
 * @from <a href="todo">爱编程学习圈</a>
 */
public interface CompanyFavourService extends IService<CompanyFavour> {

    /**
     *  用户对企业点赞
     * @param companyId
     * @param loginUserId
     * @return
     */
    int doCompanyFavour(long companyId, User loginUserId);


    /**
     * 用户点赞（内部实现）
     * @param companyId
     * @param userId
     * @return
     */
    int doCompanyFavourInner(long companyId, Long userId);

    /**
     *
     * 分页获取用户点赞列表
     * @param page
     * @param queryWrapper
     * @param favourUserId
     * @return
     */
    Page<Company> listCompanyFavourByPage(IPage<Company> page, Wrapper<Company> queryWrapper,long favourUserId);
}
